package com.simon.customer.entity;

import java.io.Serializable;

public class MerchantView implements Serializable{
	private String merchantId;
	private String merchantName;
	private String merchantAddress;
	private String merchantPic;
	
	public MerchantView(String merchantId, String merchantName,
			String merchantAddress, String merchantPic) {
		this.merchantId = merchantId;
		this.merchantName = merchantName;
		this.merchantAddress = merchantAddress;
		this.merchantPic = merchantPic;
	}
	
	public MerchantView() {
	}

	public String getMerchantId() {
		return merchantId;
	}
	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}
	public String getMerchantName() {
		return merchantName;
	}
	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}
	public String getMerchantAddress() {
		return merchantAddress;
	}
	public void setMerchantAddress(String merchantAddress) {
		this.merchantAddress = merchantAddress;
	}
	public String getMerchantPic() {
		return merchantPic;
	}
	public void setMerchantPic(String merchantPic) {
		this.merchantPic = merchantPic;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((merchantAddress == null) ? 0 : merchantAddress.hashCode());
		result = prime * result
				+ ((merchantId == null) ? 0 : merchantId.hashCode());
		result = prime * result
				+ ((merchantName == null) ? 0 : merchantName.hashCode());
		result = prime * result
				+ ((merchantPic == null) ? 0 : merchantPic.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MerchantView other = (MerchantView) obj;
		if (merchantAddress == null) {
			if (other.merchantAddress != null)
				return false;
		} else if (!merchantAddress.equals(other.merchantAddress))
			return false;
		if (merchantId == null) {
			if (other.merchantId != null)
				return false;
		} else if (!merchantId.equals(other.merchantId))
			return false;
		if (merchantName == null) {
			if (other.merchantName != null)
				return false;
		} else if (!merchantName.equals(other.merchantName))
			return false;
		if (merchantPic == null) {
			if (other.merchantPic != null)
				return false;
		} else if (!merchantPic.equals(other.merchantPic))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "MerchantView [merchantName=" + merchantName
				+ ", merchantAddress=" + merchantAddress + ", merchantPic="
				+ merchantPic + "]";
	}
	
}
